package com.example.epidemicmanagementsystemserver.controller;

import com.example.epidemicmanagementsystemserver.service.DepartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
/*
控制层,用于连接前端和后端
 */
@RestController
@RequestMapping("/depart")
public class DepartController {

    @Autowired
    DepartService departService;

    @GetMapping("/findAll")
    private List<String> findAll(){
        return departService.getAll();
    }

}
